<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        let set1 = new Set([1,2,,3,"张三",undefined,null,1,2]);
        // console.log(set1);

        // 去重
        let arr = [1,2,5,3,4,1,3,2,7,6,4,5,9,0];
        let set2 = new Set(arr);
        // console.log(set2)
        let arr1 = Array.from(set2);
        // console.log(arr1)

        let set = new Set([1,2,3,4,5]);
        // console.log(set1.size)
        let set3 = set.add(6);
        // console.log(set3)
        // console.log(set)

        // let ret = set3.delete(6);
        // console.log(set3,ret);
        // let ret1 = set3.delete(7);
        // console.log(set3,ret1);

        console.log(set3.has(8))
        console.log(set3.has(5))

        set3.clear();
        console.log(set3);
    </script>
</body>
</html>